import { RouteRecordRaw } from 'vue-router'
import customRoutes from '../modules'
import constantRoutes from './constant'
import { RouteNameMap } from '../helpers'
import ROUTE_HOME from './routeHome'

/** 路由白名单(不需要登录) */
export const whitelistRoutes: string[] = [
  RouteNameMap.get('login')!,
  RouteNameMap.get('no-permission')!,
  RouteNameMap.get('not-found')!,
  RouteNameMap.get('service-error')!,
]

/** 所有路由 */
const routes: RouteRecordRaw[] = [...customRoutes, ...constantRoutes]

export { ROUTE_HOME, routes, customRoutes, RouteNameMap }
